package designpatterns.responsibilitychain;

public class Handler1 extends Handler {
    @Override
    public void handle(String request) {
        if(request.equals("one")) {
            System.out.println("处理者1负责处理");
        } else {
            Handler next = getNext();
            if(next == null) {
                System.out.println("没有人处理");
            } else {
                next.handle(request);
            }
        }
    }
}
